<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="jquery.js"></script>
    <style>
        *{
            padding: 0px;
            margin: 0px;
        }
        .scroll{
            width: 600px;
            height: 300px;
            border: 1px solid red;
            margin: 100px auto;
            overflow: hidden;
        }
        .list > li{
            width: 90%;
            margin: 0 auto;
            height: 50px;
            text-align: center;
            line-height: 50px;
            list-style-type: none;
            border-bottom: 1px solid orange;
        }
    </style>
    <title>Document</title>
</head>
<body>
    <div class="scroll">
        <ul class="list">
            <li>100000000000000000001</li>
            <li>200000000000000000002</li>
            <li>300000000000000000003</li>
            <li>400000000000000000004</li>
            <li>500000000000000000005</li>
            <li>600000000000000000006</li>
            <li>700000000000000000007</li>
            <li>800000000000000000008</li>
        </ul>
    </div>
    <script>
        var list = $(".list");
        var liHeight = parseInt(list.find('li').eq(0).css('height'));
        setInterval(function () {
            list.css('margin-top', '-=1');
            var listMargin = Math.abs(parseInt(list.css('margin-top')));
            if(listMargin > liHeight){
                var liFirst = list.find('li').eq(0);
                liFirst.appendTo(list);
                list.css('margin-top', 0);
            }
        }, 40)
    </script>
</body>
</html>